<template>
	<view class="education-box">
		<view class="education" :class="name_null?'warn':''" @click="name_null=false">
			<view class="title">
				学校名称
				<text style="color: red;">*</text>
			</view>
			<input placeholder="请输入" border="none" v-model="form.name" style="text-align: right;"></input>
		</view>
		<view class="education" :class="drving_null?'warn':''" @click="drving_null=false">
			<view class="title">学历 <text style="color: red;">*</text> </view>
			<picker @change="Pickerdrving" :value="form.drving_index" :range="drving_arr" range-key="title">
				<view class="picker" style="display: flex;align-items: center;" v-if="form.drving_name != ''"><text
						style="margin-right: 20rpx;">{{form.drving_name}}</text>
					<i class="iconfont fontclassarrow_right"></i>
				</view>
				<view style="color: #c0c4cc;font-size: 30rpx;display: flex;align-items: center;" v-else>
					<text
						style="margin-right: 20rpx;">{{form.drving_index>-1?drving_arr[form.drving_index]['title']:'请选择'}}</text>
					<i class="iconfont fontclassarrow_right"></i>
				</view>
			</picker>
		</view>
		<view class="education" :class="profession_null?'warn':''" @click="profession_null=false">
			<view class="title">
				专业名称
			</view>
			<input placeholder="请输入" border="none" v-model="form.profession" style="text-align: right;"></input>
		</view>
		<view class="education" :class="date_null?'warn':''" @click="date_null=false">
			<view class="title">
				开始时间
				<text style="color: red;">*</text>
			</view>
			<picker mode="date" :value="form.start_time" start="1980-09-01" @change="DateChange">
				<view v-if="form.start_time == '请选择'"
					style="color: #c0c4cc;font-size: 30rpx;display: flex;align-items: center;">
					<text style="margin-right: 20rpx;">{{form.start_time}}</text>
					<i class="iconfont fontclassarrow_right"></i>
				</view>
				<view v-else style="display: flex;align-items: center;">
					<text style="margin-right: 20rpx;">{{form.start_time}}</text>
					<i class="iconfont fontclassarrow_right"></i>
				</view>
			</picker>
		</view>
		<view class="education" :class="update_null?'warn':''" @click="update_null=false">
			<view class="title">
				结束时间
				<text style="color: red;">*</text>
			</view>
			<picker mode="date" :value="form.up_time" start="1980-09-01" @change="DateChangeup">
				<view v-if="form.up_time == '请选择'"
					style="color: #c0c4cc;font-size: 30rpx;display: flex;align-items: center;">
					<text style="margin-right: 20rpx;">{{form.up_time}}</text>
					<i class="iconfont fontclassarrow_right"></i>
				</view>
				<view v-else style="display: flex;align-items: center;">
					<text style="margin-right: 20rpx;">{{form.up_time}}</text>
					<i class="iconfont fontclassarrow_right"></i>
				</view>
			</picker>
		</view>
		<view class="delete-box" v-if="deleteShow">
			<view class="delete-bnt" @click="deleteBnt">删除</view>
			<view class="add-btn" @click="ok_form()">保存</view>
		</view>
		<view class="btn" @click="ok_form()" v-else>保存</view>
	</view>
</template>

<script src="./page.js"></script>

<style scoped lang="scss">
	@import "./page.scss";
</style>
